﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            int c = 0;
            int d = 0;
            int e = 0;
            Console.WriteLine("输入一个字符串");
            String a = Console.ReadLine();
            foreach (char b in a)
            {
                if (char.IsLetter(b))
                {
                    c = c + 1;
                }
                if (char.IsDigit(b))
                {
                    d = d + 1;
                }
                if (char.IsWhiteSpace(b))
                {
                    e = e + 1;
                }
            }
            Console.WriteLine("字母数：" + c);
            Console.WriteLine("数字数：" + d);
            Console.WriteLine("空格数：" + e);
        }
    }
}
